package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.ExamPaperAnswerObject;
import com.ruoyi.system.domain.SysExamPaperAnswer;

import java.util.List;

import com.ruoyi.common.core.domain.Counts;

/**
 * 试卷答案Mapper接口
 *
 * @author ruoyi
 * @date 2025-09-18
 */
public interface SysExamPaperAnswerMapper extends BaseMapper<SysExamPaperAnswer> {

    List<SysExamPaperAnswer> selectSysExamPaperById(Long examPaperId);

    SysExamPaperAnswer selectByOpenIdAndExamPaperId(ExamPaperAnswerObject examPaperAnswerObject);

    List<SysExamPaperAnswer> selectSysExamPaperAnswerList(SysExamPaperAnswer sysExamPaperAnswer);

    List<String> selectDistinctSchool(String school);

    // 新增：按学校分组统计数量（仅使用必要筛选条件）
    List<Counts> groupSchoolCounts(SysExamPaperAnswer sysExamPaperAnswer);
}
